﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Server.Data
{
	public class Good
	{
		public int ID;
		public string Description;

		public string Quanlity;
		public string Weight;
		public string H;
		public decimal W;
		public decimal L;
		public int state;
	}

	public class LaddingVoucher
	{
		public string ID;
		public string Receiver;
		public string Sender;
		public string SenderAddr;
		public string ReiverAddr;
		public string SenderAcc;
		public string CustomerRef;
		public string SenderOrg;
		public string SenderCity;
		public string SenderEmail;
		public string MoreDetails;
		public string EnhandedLability;
		public int Priority;
		public int EconomyExpress;
		public int Express;
		public int Express1200;
		public int Express1000;
		public int Express900;
		public int ExpressSpecial;
		public DateTime DueDate;
		public DateTime SendDate;

		public bool DangoerousGood;
		public string ReceiverEmail;
		public string RecieverCoun;
		public string SenderCoun;
		public string ReceiverDist;
		public string ReciverPostal;
		public string ReceiverOrg;
		public string ReceiverPhone;
		public string SenderPhone;
		public string SenderPostal;
		public string SenderDist;


		public IEnumerable<Good> Goods;
		public InfoTag Tag;

	}
	public class User
	{
		public string username;
		public string password;
		public string name;

		public IEnumerable<Role> Roles;
	}

	public class Role
	{
		public string Name;
		public string Description;
		public IEnumerable<string> Actions;
	}

	public class RiskVoucher
	{
		public LaddingVoucher LaddingVoucher;
		public string Reason;

	}

	public class InfoTag
	{
		public User Creator;
		public DateTime CreateTime;
		public string Reason;
	}

	
	public class LaddingReceipt
	{
		/// <summary>
		/// Hóa đơn cho chứng từ
		/// </summary>
		public LaddingVoucher Voucher;

		public string ID;

		public string Address;

		public DateTime CreateTime;

		public string Reason;

		public string Receiver;

		public User creator;

		public decimal Amount;

		public string CreationReason;

		public InfoTag Tag;
	}

	public class Payment
	{
		/// <summary>
		/// Hóa đơn cho chứng từ
		/// </summary>
		public Bill Bill;

		public string ID;

		public string Address;


		public string Reason;

		public string Receiver;

		public decimal Amount;

		public InfoTag Tag;
	}

	/// <summary>
	/// Một danh mục hóa đơn trong hóa đơn
	/// </summary>
	public class BillItem
	{
		public string Name;
		public string Unit;
		public string Quantity;
		/// <summary>
		/// Đơn giá
		/// </summary>
		public string UnitPrice;

		/// <summary>
		/// Thành tiền
		/// </summary>
		public string Money;
	}

	public class RiskVoucher
	{
		public string ID;
		public LaddingVoucher LaddingVoucher;
		public string Reason;
		public Bill Bill;
		/// <summary>
		/// Người liên quan, chịu trách nhiệm
		/// </summary>
		public string Responser;
		public InfoTag Tag;

	}

	/// <summary>
	/// Hóa đơn báo giá mình đi mua hàng của nơi khác
	/// </summary>
	public class Bill
	{
		/// <summary>
		/// Đơn vị bán hàng
		/// </summary>
		public string SellerUnit;

		public string SellerAddress;

		public string SellerAccount;

		public string SellerPhone;

		public string SellerAcc;

		public string BuyerName;
		public string BuyerUnit;
		public string BuyerAddress;
		public string BuyerAcc;

		public IEnumerable<BillItem> Items;


		/// <summary>
		/// Thuế giá trị gia tăng (thường bằng 10% = 0.1)
		/// </summary>
		public float GTGT;

		public InfoTag Tag;
	}



}
